<?php
// 管理后台
$router->group([
    'namespace'=>'Admin',
    'prefix'=>'study-api/a',
//    'middleware' => ['oauth.consumer:admin', 'oauth.scope:admin']
], function() use ($router) {
    $router->get('/users/{userId}/status', 'StatusController@index');
    $router->post('/users/{userId}/level', 'StatusController@updateLevel');

    $router->get('/levels', 'LevelController@index');
    $router->post('/levels', 'LevelController@store');
    $router->put('/levels/{levelId}', 'LevelController@update');
    $router->delete('/levels/{levelId}', 'LevelController@destroy');

    $router->get('/level-words', 'LevelWordController@index');
    $router->post('/level-words', 'LevelWordController@store');
    $router->put('/level-words/{wordId}', 'LevelWordController@update');
    $router->delete('/level-words/{wordId}', 'LevelWordController@destroy');
});
